package edu.zut.oop_test.test2;

/**
 * 表示班级实体类
 */
public class Grade {

    String number;
    String name;
    String msg;

    //一个班有多个学生
    Student[] stus;

    public void say(){
        System.out.println("班级" + name + "，学生有:");
        for (Student student : stus) {
            student.tell();
        }
    }



    public static void main(String[] args) {
        Grade grade = new Grade();
        grade.number = "bg217";
        grade.name = "大数据217";
        grade.msg = "大数据21级7班";
        Student student = new Student();
        student.set("20210010","tom",19);
        Student student2 = new Student();
        student2.set("20210011","张三",19);
        Student student3 = new Student();
        student3.set("20210012","李四",19);
        grade.stus = new Student[]{student,student2,student3};
        grade.say();

    }



}
